package sanrenxing.dayEnd.backRepertoryTotal.domain;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @desrciption 实体类 行情数据
 * @auth：yidu 李小锋
 * @date:2021/3/12 0012 - 9:54
 * @version:1:0
 */
public class MarketData implements Serializable {
    private int marketId;	//主键编号
    private String seId;	//证券编号	varchar2
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date inputDate;	//录入日期	date
    private double openPrice;	//开盘价格	number
    private double closePrice;	//闭市价格	number
    private String notes;	//备注	varchar2

    public MarketData() {
    }

    public MarketData(String seId, Date inputDate, double openPrice, double closePrice, String notes) {
        this.seId = seId;
        this.inputDate = inputDate;
        this.openPrice = openPrice;
        this.closePrice = closePrice;
        this.notes = notes;
    }

    public MarketData(int marketId, String seId, Date inputDate, double openPrice, double closePrice, String notes) {
        this.marketId = marketId;
        this.seId = seId;
        this.inputDate = inputDate;
        this.openPrice = openPrice;
        this.closePrice = closePrice;
        this.notes = notes;
    }

    public int getMarketId() {
        return marketId;
    }

    public void setMarketId(int marketId) {
        this.marketId = marketId;
    }

    public String getSeId() {
        return seId;
    }

    public void setSeId(String seId) {
        this.seId = seId;
    }

    public Date getInputDate() {
        return inputDate;
    }

    public void setInputDate(Date inputDate) {
        this.inputDate = inputDate;
    }

    /*public Date getInputDate() {
            return inputDate;
        }

        public void setInputDate(Date inputDate) {
            *//*if (inputDate.trim().equals("")){
            this.inputDate=null;
        }else {
            try {
                this.inputDate = new SimpleDateFormat("yyyy-MM-dd").parse(inputDate);
            } catch (ParseException e) {
                e.printStackTrace();
            }
        }*//*
    }
*/
    public double getOpenPrice() {
        return openPrice;
    }

    public void setOpenPrice(double openPrice) {
        this.openPrice = openPrice;
    }

    public double getClosePrice() {
        return closePrice;
    }

    public void setClosePrice(double closePrice) {
        this.closePrice = closePrice;
    }

    public String getNotes() {
        return notes;
    }

    public void setNotes(String notes) {
        this.notes = notes;
    }

    @Override
    public String toString() {
        return "MarketData{" +
                "marketId=" + marketId +
                ", seId='" + seId + '\'' +
                ", inputDate=" + inputDate +
                ", openPrice=" + openPrice +
                ", closePrice=" + closePrice +
                ", notes='" + notes + '\'' +
                '}';
    }
}
